package tjs.study.notes.dotest.zookper.locker;

import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.RetryNTimes;
import tjs.study.notes.dotest.zookper.locker.common.TestLockCommon;
import tjs.study.notes.dotest.zookper.locker.curator.RLockCuratorFactory;
import tjs.study.notes.dotest.zookper.locker.mini.RLockMiniFactory;

/**
 * Created by Nicky.Tang on 2021/11/10 11:55 上午
 *
 * @since 02.12.10
 */
public class DoTestOfCurator {
    public static void main(String[] args) throws InterruptedException {
        CuratorFramework framework = CuratorFrameworkFactory.newClient(
                "127.0.0.1:2181",
                20000,
                20000,
                new RetryNTimes(3, 5000));
        framework.start();

        RLockCuratorFactory rLockCuratorFactory = new RLockCuratorFactory(framework);
        TestLockCommon.doTest(rLockCuratorFactory, "/aioushqw12311114121", 100);

    }
}
